package es.upv.tricia.activity;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import es.upv.tricia.R;

public class CreditsActivity extends Activity
{
	private static final String DEBUG_TAG  = "CreditsActivity";
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.credits);
		
		InputStream inputStream = getResources().openRawResource(R.raw.credit_text1);
		DataInputStream dataStream = new DataInputStream(inputStream);
		TextView tvName1 = (TextView) findViewById(R.id.creditsName1);
		TextView tvName2 = (TextView) findViewById(R.id.creditsName2);
		
		try {
			String line = dataStream.readLine();
			tvName1.setText(line);
			line = dataStream.readLine();
			tvName2.setText(line);
			
			dataStream.close();
			inputStream.close();
		}
		catch (IOException ioe) 
		{
			Log.d(DEBUG_TAG, "Error while reading myFile");
		
		}
		
	}
}
